﻿#include "student.h"
#include "QDebug"
#include "QTextCodec"
#include "qpushbutton.h"
student::student(QObject *parent) : QObject(parent)
{

}
void student::treat()
{
    QTextCodec *codec = QTextCodec::codecForName("GBK");//修改这两行
    qDebug()<<codec->toUnicode("请老师吃饭");
}

void student::treat(QString foodName)
{
    QTextCodec *codec = QTextCodec::codecForName("GBK");//修改这两行
    qDebug()<<codec->toUnicode("请老师吃饭，老师要吃：")<<foodName;

}
